class Rectangle:
    def __init__(self, width = 1.0, height = 1.0):
        self._width = width
        self._height = height

    def compute_area(self):
        return self._width * self._height

    def compute_perimeter(self):
        return (self._width + self._height) * 2
re1 = Rectangle(3.4, 5.6)
re2 = Rectangle(4.667, 5.2789)

print('图形1：')
print(f"{re1.compute_area():.2f}")
print(f"{re1.compute_perimeter():.2f}")

print('图形2：')
print(f"{re2.compute_area():.2f}")
print(f"{re2.compute_perimeter():.2f}")

re1._width = 12.11
re1._height = 6.18
print('图形1修改后：')
print(f"{re1.compute_area():.2f}")
print(f"{re1.compute_perimeter():.2f}")
